<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The EventHttp class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventdnsbase.setsearchndots.html">EventDnsBase::setSearchNdots</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="eventhttp.accept.html">EventHttp::accept</a></div>
 <div class="up"><a href="book.event.html">Event</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.eventhttp" class="reference">
 <h1 class="title">The EventHttp class</h1>
 
 <div class="partintro"><p class="verinfo">(PECL event &gt;= 1.4.0-beta)</p>

  <div class="section" id="eventhttp.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    Represents HTTP server.
   </p>
  </div>

  <div class="section" id="eventhttp.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">final</span>
      <strong class="classname">EventHttp</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">bool</span>
   <span class="methodname"><a href="eventhttp.accept.html" class="methodname">accept</a></span>
    ( <span class="methodparam">
    <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span>
     <code class="parameter">$socket</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">bool</span>
   <span class="methodname"><a href="eventhttp.addserveralias.html" class="methodname">addServerAlias</a></span>
    ( <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$alias</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="eventhttp.bind.html" class="methodname">bind</a></span>
    ( <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$address</code>
   </span>
   , <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$port</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="methodname"><a href="eventhttp.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam">
    <span class="type"><a href="class.eventbase.html" class="type EventBase">EventBase</a></span>
     <code class="parameter">$base</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">bool</span>
   <span class="methodname"><a href="eventhttp.removeserveralias.html" class="methodname">removeServerAlias</a></span>
    ( <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$alias</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="eventhttp.setallowedmethods.html" class="methodname">setAllowedMethods</a></span>
    ( <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$methods</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="eventhttp.setcallback.html" class="methodname">setCallback</a></span>
    ( <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$path</code>
   </span>
   , <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$cb</code>
   </span>
   [, <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$arg</code>
   </span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="eventhttp.setdefaultcallback.html" class="methodname">setDefaultCallback</a></span>
    ( <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$cb</code>
   </span>
   [, <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$arg</code>
   </span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="eventhttp.setmaxbodysize.html" class="methodname">setMaxBodySize</a></span>
    ( <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$value</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="eventhttp.setmaxheaderssize.html" class="methodname">setMaxHeadersSize</a></span>
    ( <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$value</code>
   </span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="eventhttp.settimeout.html" class="methodname">setTimeout</a></span>
    ( <span class="methodparam">
    <span class="type">int</span>
     <code class="parameter">$value</code>
   </span>
   )</div>

   }</div>

  </div>
 </div>

 
























































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="eventhttp.accept.html">EventHttp::accept</a> — Makes an HTTP server accept connections on the specified socket stream or resource</li><li><a href="eventhttp.addserveralias.html">EventHttp::addServerAlias</a> — Adds a server alias to the HTTP server object</li><li><a href="eventhttp.bind.html">EventHttp::bind</a> — Binds an HTTP server on the specified address and port</li><li><a href="eventhttp.construct.html">EventHttp::__construct</a> — Constructs EventHttp object(the HTTP server)</li><li><a href="eventhttp.removeserveralias.html">EventHttp::removeServerAlias</a> — Removes server alias</li><li><a href="eventhttp.setallowedmethods.html">EventHttp::setAllowedMethods</a> — Sets the what HTTP methods are supported in requests accepted by this server, and passed to user callbacks</li><li><a href="eventhttp.setcallback.html">EventHttp::setCallback</a> — Sets a callback for specified URI</li><li><a href="eventhttp.setdefaultcallback.html">EventHttp::setDefaultCallback</a> — Sets default callback to handle requests that are not caught by specific callbacks</li><li><a href="eventhttp.setmaxbodysize.html">EventHttp::setMaxBodySize</a> — Sets maximum request body size</li><li><a href="eventhttp.setmaxheaderssize.html">EventHttp::setMaxHeadersSize</a> — Sets maximum HTTP header size</li><li><a href="eventhttp.settimeout.html">EventHttp::setTimeout</a> — Sets the timeout for an HTTP request</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventdnsbase.setsearchndots.html">EventDnsBase::setSearchNdots</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="eventhttp.accept.html">EventHttp::accept</a></div>
 <div class="up"><a href="book.event.html">Event</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
